//package com.yupi.yuaicodemother.ai.model;
//import dev.langchain4j.data.document.Document;
//import dev.langchain4j.model.embedding.EmbeddingModel;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import java.util.List;
//import java.util.stream.Collectors;
//
//
//@Configuration
//public class StandardVectorConfig {
//
//    @Bean
//    VectorStore standardVectorStore(EmbeddingModel embedding) {
//        SimpleVectorStore store = SimpleVectorStore.builder(embedding).build();
//
//        // 扫描 docs/code-standards 目录
//        List<Document> docs = new TikaDocumentReader("docs/code-standards/*.md")
//                .read()
//                .stream()
//                .flatMap(d -> new TokenTextSplitter(256, 30).split(d).stream())
//                .collect(Collectors.toList());
//        store.add(docs);
//        log.info("已加载 {} 条规范", docs.size());
//        return store;
//    }
//}